//package com.misty.dao.config;
//
//import com.baomidou.mybatisplus.annotation.DbType;
//import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
//import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
//import org.springframework.beans.factory.annotation.Value;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//
//@Configuration
//public class BaseDataSource {
//
//    @Value("${spring.datasource.maxIdle}")
//    protected int maxIdle;
//
//    @Value("${spring.datasource.maxWait}")
//    protected int maxWait;
//
//    @Value("${spring.datasource.minIdle}")
//    protected int minIdle;
//
//    @Value("${spring.datasource.initialSize}")
//    protected int initialSize;
//
//    @Value("${spring.datasource.validationQuery}")
//    protected String validationQuery;
//
//    @Value("${spring.datasource.testOnBorrow}")
//    protected boolean testOnBorrow;
//
//    @Value("${spring.datasource.testWhileIdle}")
//    protected boolean testWhileIdle;
//
//    @Value("${spring.datasource.timeBetweenEvictionRunsMillis}")
//    protected int timeBetweenEvictionRunsMillis;
//
//    @Bean
//    public MybatisPlusInterceptor mybatisPlusInterceptor() {
//        MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
//        interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL));
//        return interceptor;
//    }
//}
